/* ===== Dashboard Container ===== */
.dashboard-container {
  width: 82%;
  margin: 30px auto;
  margin-right: 17%;
  display: flex;
  flex-direction: column;
  gap: 50px;
  padding: 20px;
}

/* ===== Section Titles ===== */
.section-title {
  color: #2c4b2c;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 25px;
  text-align: right;
  border-bottom: 2px solid #e0ead1;
  padding-bottom: 12px;
}

/* ===== Slider Section ===== */
.sliders-added {
  background: #fdf9f4;
  padding: 30px;
  border-radius: 12px;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
  width: 50%;
  margin: auto;
}

.slider-upload-section {
  margin-bottom: 30px;
}

.upload-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  flex-direction: row-reverse;
}

.btn-upload {
  background: linear-gradient(135deg, #779e63 0%, #596d52 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;
}

.btn-upload:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.25) 0px 5px 15px;
}

.btn-upload:active {
  transform: translateY(0);
}

.link-input {
  flex: 1;
  min-width: 250px;
  padding: 12px 15px;
  border: 2px solid #e0ead1;
  border-radius: 8px;
  font-size: 14px;
  text-align: right;
  transition: all 0.3s ease;
  background: white;
}

.link-input:focus {
  outline: none;
  border-color: #779e63;
  box-shadow: 0 0 0 3px rgba(119, 158, 99, 0.1);
}

.btn-add-slider {
  background: #2c4b2c;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-add-slider:hover {
  background: #1e3a1e;
  transform: scale(1.05);
}

.sliders-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.slider-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
  transition: all 0.3s ease;
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slider-card:hover {
  transform: translateY(-5px);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 20px;
}

.slider-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.slider-card-content {
  padding: 15px;
}

.slider-link {
  color: #596d52;
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 10px;
  display: block;
  text-align: right;
}

.btn-remove-slider {
  background: #d9534f;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
}

.btn-remove-slider:hover {
  background: #c9302c;
  transform: scale(1.02);
}

/* ===== Offer Page Section ===== */
.offer-page {
  background: #fdf9f4;
  padding: 30px;
  border-radius: 12px;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
  width: 50%;
  margin: auto;
}

.offer-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-gr {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-direction: row-reverse;
}

.form-group label {
  color: #2c4b2c;
  font-size: 15px;
  font-weight: 500;
  text-align: right;
}

.image-upload-area {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.upload-placeholder {
  border: 2px dashed #779e63;
  border-radius: 10px;
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.upload-placeholder:hover {
  border-color: #2c4b2c;
  background: #f9efe3;
}

.upload-placeholder span {
  font-size: 48px;
  color: #779e63;
  display: block;
  margin-bottom: 10px;
}

.upload-placeholder p {
  color: #596d52;
  font-size: 14px;
}

.image-preview {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

.form-input {
  padding: 12px 15px;
  border: 2px solid #e0ead1;
  border-radius: 8px;
  font-size: 14px;
  text-align: right;
  transition: all 0.3s ease;
  background: white;
  width: 80%;
}

.form-input:focus {
  outline: none;
  border-color: #779e63;
  box-shadow: 0 0 0 3px rgba(119, 158, 99, 0.1);
}

.url-builder {
  display: flex;
  align-items: center;
  gap: 0;
  background: white;
  border: 2px solid #e0ead1;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  width: 85%;
}

.url-builder:focus-within {
  border-color: #779e63;
  box-shadow: 0 0 0 3px rgba(119, 158, 99, 0.1);
}

.url-prefix {
  background: #e0ead1;
  color: #2c4b2c;
  padding: 12px 15px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.url-input {
  flex: 1;
  padding: 12px 15px;
  border: none;
  font-size: 14px;
  text-align: right;
}

.url-input:focus {
  outline: none;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-end;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 18px;
  border: 2px solid #e0ead1;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: white;
}

.checkbox-item:hover {
  border-color: #779e63;
  background: #f9efe3;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #2c4b2c;
}

.checkbox-item input[type="checkbox"]:checked + .checkbox-label {
  color: #2c4b2c;
  font-weight: 600;
}

.checkbox-item:has(input:checked) {
  background: #e0ead1;
  border-color: #2c4b2c;
  box-shadow: 0 0 0 3px rgba(44, 75, 44, 0.1);
}

.checkbox-label {
  color: #596d52;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-add-products {
  background: linear-gradient(135deg, #2c4b2c 0%, #1e3a1e 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 12px;
  margin-top: 10px;
}

.btn-add-products:hover {
  transform: translateY(-3px);
  box-shadow: rgba(0, 0, 0, 0.3) 0px 8px 20px;
}

.btn-add-products:active {
  transform: translateY(0);
}

.selected-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.selected-product-card {
  background: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 8px;
  text-align: right;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.selected-product-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.selected-product-card h4 {
  color: #2c4b2c;
  font-size: 14px;
  margin-bottom: 5px;
}

.selected-product-card p {
  color: #779e63;
  font-size: 13px;
  font-weight: 600;
}

.btn-submit-offer {
  background: linear-gradient(135deg, #779e63 0%, #596d52 100%);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 12px;
  margin-top: 25px;
  width: 100%;
}

.btn-submit-offer:hover {
  transform: translateY(-3px);
  box-shadow: rgba(0, 0, 0, 0.3) 0px 8px 20px;
}

.btn-submit-offer:active {
  transform: translateY(0);
}

/* ===== Available Offers Section ===== */
.available-offers-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e0ead1;
}

.subsection-title {
  color: #2c4b2c;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: right;
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.offer-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  animation: slideIn 0.4s ease;
}

.offer-card:hover {
  transform: translateY(-5px);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 20px;
}

.offer-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.offer-card-content {
  padding: 15px;
  text-align: right;
}

.offer-card-content h4 {
  color: #2c4b2c;
  font-size: 16px;
  margin: 0;
}

/* ===== Toast Notification ===== */
.toast-notification {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2c4b2c 0%, #1e3a1e 100%);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 8px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  z-index: 2000;
  transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-notification.show {
  bottom: 30px;
}

.toast-icon {
  font-size: 20px;
  color: #a8d08d;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 20px 60px;
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-overlay.closing .modal-container {
  animation: modalSlideOut 0.3s ease forwards;
}

@keyframes modalSlideOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
}

.modal-header {
  background: linear-gradient(135deg, #e0ead1 0%, #f9efe3 100%);
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #d0dac1;
  flex-direction: row-reverse;
}

.modal-header h3 {
  color: #2c4b2c;
  font-size: 20px;
  font-weight: 600;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #2c4b2c;
  font-size: 20px;
  cursor: pointer;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.btn-close-modal:hover {
  background: rgba(44, 75, 44, 0.1);
  transform: rotate(90deg);
}

.modal-body {
  padding: 25px;
  overflow-y: auto;
  max-height: calc(85vh - 80px);
}

.search-container {
  position: relative;
  margin-bottom: 25px;
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #779e63;
  font-size: 18px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 45px 12px 15px;
  border: 2px solid #e0ead1;
  border-radius: 10px;
  font-size: 15px;
  text-align: right;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #779e63;
  box-shadow: 0 0 0 4px rgba(119, 158, 99, 0.1);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: #fdf9f4;
  border-radius: 10px;
  padding: 15px;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 8px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 15px;
}

.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.product-card h4 {
  color: #2c4b2c;
  font-size: 14px;
  text-align: right;
  margin: 0;
  line-height: 1.4;
}

.discount-input {
  padding: 8px 12px;
  border: 2px solid #e0ead1;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  transition: all 0.3s ease;
}

.discount-input:focus {
  outline: none;
  border-color: #779e63;
  box-shadow: 0 0 0 3px rgba(119, 158, 99, 0.1);
}

.btn-add-product {
  background: #779e63;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-add-product:hover {
  background: #2c4b2c;
  transform: scale(1.05);
}

.btn-add-product:active {
  transform: scale(0.98);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-container {
    width: 90%;
    margin-right: 5%;
    margin-left: 5%;
  }

  .offer-page,
  .sliders-added {
    width: 80%;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    width: 95%;
    margin: 20px auto;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .offer-page,
  .sliders-added {
    width: 100%;
    padding: 20px;
  }

  .upload-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .link-input {
    min-width: 100%;
  }

  .checkbox-group {
    justify-content: flex-end;
  }

  .checkbox-item {
    width: 100%;
    justify-content: flex-end;
  }

  .modal-container {
    width: 95%;
    max-height: 90vh;
  }

  .sliders-preview {
    grid-template-columns: 1fr;
  }

  .form-group {
    flex-direction: column;
    align-items: flex-end;
  }

  .form-input,
  .url-builder {
    width: 100%;
  }
}

/* ===== Delete Button (Edit Page) ===== */
.btn-delete-offer {
  background: linear-gradient(135deg, #d9534f 0%, #c9302c 100%);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 12px;
  margin-top: 15px;
  width: 100%;
}

.btn-delete-offer:hover {
  transform: translateY(-3px);
  box-shadow: rgba(0, 0, 0, 0.3) 0px 8px 20px;
  background: linear-gradient(135deg, #c9302c 0%, #a02622 100%);
}

.btn-delete-offer:active {
  transform: translateY(0);
}
